/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.employee.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.employee.entity.Employee;

/**
 * 店员DAO接口
 * @author lvbo
 * @version 2013-07-05
 */
public interface EmployeeDao extends EmployeeDaoCustom, CrudRepository<Employee, Long> {

	@Query("from Employee where STORE_ID = ?1")
	public List<Employee> findListByStore(Long id);
	
	@Query("from Employee where STORE_ID = ?1 and STATUS = ?2")
	public List<Employee> findListByStore(Long id, int status);
}

/**
 * DAO自定义接口
 * @author lvbo
 */
interface EmployeeDaoCustom extends BaseDao<Employee> {

}

/**
 * DAO自定义接口实现
 * @author lvbo
 */
@Component
class EmployeeDaoImpl extends BaseDaoImpl<Employee> implements EmployeeDaoCustom {

}
